package com.PDP.util.reports.customReports;

import com.PDP.util.reports.ReportInfo;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Cascade;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name="reports")
public class CustomReportEntity {
    @Id
    @GeneratedValue
    private Long id;
    @ManyToOne
    @Cascade(org.hibernate.annotations.CascadeType.ALL)
    private ReportInfo reportInfo;
    @OneToMany
    @Cascade(org.hibernate.annotations.CascadeType.ALL)
    private List<QueryData> query;

}
